﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EMC.VISITOR.Application
{
    [SugarTable(null, "访客关联明细")]
    [BusinessVS]
    public class VisitLogDetail : EntityBase
    {
        /// <summary>
        /// 关联访客的主键Id
        /// </summary>
        [SugarColumn(ColumnDescription = "海康用户Id", IsNullable = true, IndexGroupNameList = new string[] { "index_vdetail_perid" })]
        public long personId { get; set; }
        [SugarColumn(ColumnDescription = "海康添加或刪除用戶反饋結果", IsNullable = true, Length = 1000)]
        public string personMessage { get; set; }

        [SugarColumn(ColumnDescription = "海康人脸分组Id", IsNullable = true)]
        public string faceGroupId { get; set; }
        [SugarColumn(ColumnDescription = "海康人脸分组返回消息", IsNullable = true)]
        public string faceGroupMessage { get; set; }
        [SugarColumn(ColumnDescription = "海康人脸Id", IsNullable = true)]
        public string faceId { get; set; }
        [SugarColumn(ColumnDescription = "海康添加或刪除人脸反饋結果", IsNullable = true,Length = 1000)]
        public string faceMessage { get; set; }

        [SugarColumn(ColumnDescription = "海康权限Id", IsNullable = true)]
        public string addAuthTaskId { get; set; }
        [SugarColumn(ColumnDescription = "海康添加或刪除權限返回結果", IsNullable = true, Length = 1000)]
        public string addDeleAuthMessage { get; set; }
        [SugarColumn(ColumnDescription = "訪客當前生效權限", IsNullable = true, IsJson = true)]
        public string[] doorPoints { get; set; }
        [SugarColumn(ColumnDescription = "邮件发送结果", IsNullable = true)]
        public bool? EmialSendResult { get; set; }
        [SugarColumn(ColumnDescription = "企业微信发送结果", IsNullable = true)]
        public bool? WchatSendResult { get; set; }
        [SugarColumn(ColumnDescription = "邮箱发送失败结果", IsNullable = true, Length = 500)]
        public string? EmialResultMessage { get; set; }
        [SugarColumn(ColumnDescription = "微信发送失败结果", IsNullable = true, Length = 500)]
        public string? WchatResultMessage { get; set; }

        [SugarColumn(ColumnDescription = "門禁可出入權限下發時間", IsNullable = true)]
        public DateTime? DoorAuthStartTime { get; set; }

        [SugarColumn(ColumnDescription = "车辆预约单号", IsNullable = true,IsJson = true)]
        public string[] CarReserveOrderNo { get; set; }
        [SugarColumn(ColumnDescription = "訪客車輛當前生效權限", IsNullable = true, IsJson = true)]
        public string[] CarPoints { get; set; }
        [SugarColumn(ColumnDescription = "车辆可出入權限下發時間", IsNullable = true)]
        public DateTime? CarAuthStartTime { get; set; }
        [SugarColumn(ColumnDescription = "海康添加或删除车辆预约返回结果",IsJson =true, IsNullable = true)]
        public string[] AddDeleteCarMessage { get; set; }
        [SugarColumn(ColumnDescription = "人员最后进出时间", IsNullable = true)]
        public DateTime? DoorLastTime { get; set; }
        [SugarColumn(ColumnDescription = "汽车最后进出时间", IsNullable = true)]
        public DateTime? CarLastTime { get; set; }
        [SugarColumn(ColumnDescription = "下发到设备的任务Id", IsNullable = true)]
        public string EqQueryTaskId { get; set; }
        /// <summary>
        /// 门禁权限
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public virtual List<HKDoorPoint> doorPointList { get; set; }
    }
}
